﻿using System;

namespace _11_重载方法
{
    class Program
    {
        static void Main(string[] args)
        {

            Test t = new Test();
            int r1 = t.Compute(5);
            int r2 = t.Compute(5,5);
            int r3 = t.Compute(5, 5, 5);
            Console.WriteLine("三个计算结果分别为：{0},{1},{2}", r1, r2, r3);
            Console.Read();
        
        }

    }


    class Test
    {
        public int Compute(int a)
        {
            return a * 1;
        }

        public int Compute(int a, int b)
        {
            return a * b;
        }

        public int Compute(int a, int b, int c)
        {
            return a * b * c;
        }

    }

}
